Change in openvpn[master]: Make it more explicit and visible when pkg-config is not found
A message that is not in the archive (sent off-list or not yet received): gerrit.1701436335000.Iebaa35a23e217a4cd7739af229cbfc08a3d8854a@...2715...
Attention is currently required from: flichtenheld.
Hello flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
to review the following change.
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Make it more explicit and visible when pkg-config is not found
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (using /usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
---
M configure.ac
1 file changed, 14 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/465/1
configure.ac +14 -5
@@ -382,6 +382,14 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + pkg_config_found="(not found)" +else + pkg_config_found="(using ${PKG_CONFIG})" +fi + + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -818,7 +826,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -862,10 +870,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -886,7 +895,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1091,7 +1100,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1515,7 +1524,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: plaisthos.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
File configure.ac:
http://gerrit.openvpn.net/c/openvpn/+/465/comment/40d96ea7_0246b3c8 :
PS1, Line 387: pkg_config_found="(not found)"
indent
http://gerrit.openvpn.net/c/openvpn/+/465/comment/78923a38_48ba8d16 :
PS1, Line 873: # We require pkg-config
indent
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Fri, 01 Dec 2023 14:24:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: flichtenheld.
plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 1:
(1 comment)
File configure.ac:
http://gerrit.openvpn.net/c/openvpn/+/465/comment/1f49058a_883de55c :
PS1, Line 387: pkg_config_found="(not found)"
Quoted 1 line
indent
Damn indenting with tabs instead of spaces. I will double check all other indents as well.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 11 Dec 2023 14:03:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>
Gerrit-MessageType: comment
Attention is currently required from: flichtenheld.
Hello flichtenheld,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review-1 by flichtenheld
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Make it more explicit and visible when pkg-config is not found
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (using /usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
---
M configure.ac
1 file changed, 14 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/465/2
configure.ac +14 -5
@@ -382,6 +382,14 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + pkg_config_found="(not found)" +else + pkg_config_found="(using ${PKG_CONFIG})" +fi + + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -816,7 +824,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -860,10 +868,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -884,7 +893,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1089,7 +1098,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1513,7 +1522,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newpatchset
Attention is currently required from: flichtenheld.
plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 2:
(2 comments)
File configure.ac:
http://gerrit.openvpn.net/c/openvpn/+/465/comment/28017652_1a658295 :
PS1, Line 387: pkg_config_found="(not found)"
Quoted 1 line
Damn indenting with tabs instead of spaces. I will double check all other indents as well.
Done
http://gerrit.openvpn.net/c/openvpn/+/465/comment/a9e557dc_cc9d2ae5 :
PS1, Line 873: # We require pkg-config
Quoted 1 line
indent
Done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 11 Dec 2023 14:04:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: plaisthos <[email protected]...>
Comment-In-Reply-To: flichtenheld <[email protected]...>
Gerrit-MessageType: comment
Attention is currently required from: plaisthos.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Mon, 11 Dec 2023 16:59:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v2 1/1 Make it more explicit and visible when pkg-config is not found
In reply to a message not in the archiveFrom: Arne Schwabe <[email protected]...>
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (using /usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/465
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>
configure.ac +14 -5
@@ -382,6 +382,14 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + pkg_config_found="(not found)" +else + pkg_config_found="(using ${PKG_CONFIG})" +fi + + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -816,7 +824,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -860,10 +868,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -884,7 +893,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1089,7 +1098,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1513,7 +1522,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
Attention is currently required from: plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
Patchset:
PS2:
To be honest, I find a message telling me "is pkg-config installed (using /usr/bin/pkg-config)?" to be even more confusing.
If we already know we have pkg-config, we shouldn't ask - and if we know we do not have pkg-config, we shouldn't bother asking for "is libcap-ng installed?" because we know we wouldn't find it, even if it is...
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Mon, 18 Dec 2023 18:18:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: cron2, flichtenheld, plaisthos.
Hello cron2, flichtenheld,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld, Code-Review-1 by cron2
The change is no longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfied now.
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Make it more explicit and visible when pkg-config is not found
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
On platforms that do not require pkg-config and for optional libraries, the existence of pkg-config is mentioned as part of the error/warning message.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (using /usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
On platforms where pkg-config is required (only Linux at the moment), configure will abort when not detecting pkg-config:
checking for pkg-config... no
configure: error: pkg-config is required
---
M configure.ac
1 file changed, 17 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/465/3
configure.ac +17 -5
@@ -323,6 +323,7 @@ AM_CONDITIONAL([TARGET_LINUX], [true]) AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) have_sitnl="yes" + pkg_config_required="yes" ;; *-*-solaris*) AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?])
@@ -376,6 +377,16 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + if test "${pkg_config_required}" = "yes"; then + AC_MSG_ERROR([pkg-config is required]) + fi + pkg_config_found="(not found)" +else + pkg_config_found="(using ${PKG_CONFIG})" +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -810,7 +821,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -854,10 +865,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -878,7 +890,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1083,7 +1095,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1508,7 +1520,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 3
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newpatchset
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 3: Code-Review+2
(1 comment)
Patchset:
PS3:
I do like the new approach. Hope to see a test report from ordex (he does this "linux" stuff, I have been told). But I can still +2 it in the meantime and send to the list.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 3
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 04 Jan 2024 16:29:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v3 1/1 Make it more explicit and visible when pkg-config is not found
In reply to a message not in the archiveFrom: Arne Schwabe <[email protected]...>
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
On platforms that do not require pkg-config and for optional libraries, the existence of pkg-config is mentioned as part of the error/warning message.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (using /usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
On platforms where pkg-config is required (only Linux at the moment), configure will abort when not detecting pkg-config:
checking for pkg-config... no
configure: error: pkg-config is required
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/465
This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
configure.ac +17 -5
@@ -323,6 +323,7 @@ AM_CONDITIONAL([TARGET_LINUX], [true]) AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) have_sitnl="yes" + pkg_config_required="yes" ;; *-*-solaris*) AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?])
@@ -376,6 +377,16 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + if test "${pkg_config_required}" = "yes"; then + AC_MSG_ERROR([pkg-config is required]) + fi + pkg_config_found="(not found)" +else + pkg_config_found="(using ${PKG_CONFIG})" +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -810,7 +821,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -854,10 +865,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -878,7 +890,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1083,7 +1095,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1508,7 +1520,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
Attention is currently required from: flichtenheld, plaisthos.
ordex has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 3: Code-Review-1
(3 comments)
Patchset:
PS3:
Other than the two comments I added in the code, the patch does what it says and it makes very straightforward understanding that pkg-config is now not installed. Tested a couple of cases on my lovely gentoo and it just worked.
File configure.ac:
http://gerrit.openvpn.net/c/openvpn/+/465/comment/a58bb3dc_c4b892a1 :
PS3, Line 385: pkg_config_found="(not found)"
am I wrong or there is some indentation havoc here? The line above uses 8blanks tab, but the lines before have 4 spaces indentation?
I think we uses tabs everywhere else.
http://gerrit.openvpn.net/c/openvpn/+/465/comment/5512845f_c09de864 :
PS3, Line 387: pkg_config_found="(using ${PKG_CONFIG})"
many error messages already contain 'using pkg-config', therefore the text above will lead to 'using using', which sounds weird. How about changing 'using' with 'path:'?
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 3
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 04 Jan 2024 23:17:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: cron2, flichtenheld, ordex, plaisthos.
Hello cron2, flichtenheld, ordex,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Code-Review+2 by cron2, Code-Review-1 by ordex
The change is no longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfied now.
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Make it more explicit and visible when pkg-config is not found
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
On platforms that do not require pkg-config and for optional libraries, the existence of pkg-config is mentioned as part of the error/warning message.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (/usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
On platforms where pkg-config is required (only Linux at the moment), configure will abort when not detecting pkg-config:
checking for pkg-config... no
configure: error: pkg-config is required
---
M configure.ac
1 file changed, 17 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/465/4
configure.ac +17 -5
@@ -323,6 +323,7 @@ AM_CONDITIONAL([TARGET_LINUX], [true]) AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) have_sitnl="yes" + pkg_config_required="yes" ;; *-*-solaris*) AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?])
@@ -376,6 +377,16 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + if test "${pkg_config_required}" = "yes"; then + AC_MSG_ERROR([pkg-config is required]) + fi + pkg_config_found="(not found)" +else + pkg_config_found="(${PKG_CONFIG})" +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -810,7 +821,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -854,10 +865,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -878,7 +890,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1083,7 +1095,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1508,7 +1520,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 4
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: ordex <[email protected]...>
Gerrit-MessageType: newpatchset
Attention is currently required from: cron2, flichtenheld, ordex.
plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 4:
(2 comments)
File configure.ac:
http://gerrit.openvpn.net/c/openvpn/+/465/comment/dcc958e2_10a99171 :
PS3, Line 385: pkg_config_found="(not found)"
Quoted 1 line
am I wrong or there is some indentation havoc here? The line above uses 8blanks tab, but the lines b […]
Done
http://gerrit.openvpn.net/c/openvpn/+/465/comment/2097ad6b_aaa8c8c1 :
PS3, Line 387: pkg_config_found="(using ${PKG_CONFIG})"
Quoted 1 line
many error messages already contain 'using pkg-config', therefore the text above will lead to 'using […]
Done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 4
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: ordex <[email protected]...>
Gerrit-Comment-Date: Fri, 05 Jan 2024 12:25:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: ordex <[email protected]...>
Gerrit-MessageType: comment
Attention is currently required from: cron2, flichtenheld, ordex.
Hello cron2, flichtenheld, ordex,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
to look at the new patch set (#5).
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Make it more explicit and visible when pkg-config is not found
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
On platforms that do not require pkg-config and for optional libraries, the existence of pkg-config is mentioned as part of the error/warning message.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (/usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
On platforms where pkg-config is required (only Linux at the moment), configure will abort when not detecting pkg-config:
checking for pkg-config... no
configure: error: pkg-config is required
---
M configure.ac
1 file changed, 17 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/465/5
configure.ac +17 -5
@@ -323,6 +323,7 @@ AM_CONDITIONAL([TARGET_LINUX], [true]) AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) have_sitnl="yes" + pkg_config_required="yes" ;; *-*-solaris*) AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?])
@@ -376,6 +377,16 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + if test "${pkg_config_required}" = "yes"; then + AC_MSG_ERROR([pkg-config is required]) + fi + pkg_config_found="(not found)" +else + pkg_config_found="(${PKG_CONFIG})" +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -810,7 +821,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -854,10 +865,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -878,7 +890,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1083,7 +1095,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1508,7 +1520,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 5
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: ordex <[email protected]...>
Gerrit-MessageType: newpatchset
Attention is currently required from: cron2, flichtenheld, plaisthos.
ordex has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 5
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Fri, 05 Jan 2024 13:51:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v5 1/1 Make it more explicit and visible when pkg-config is not found
In reply to a message not in the archiveFrom: Arne Schwabe <[email protected]...>
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
On platforms that do not require pkg-config and for optional libraries, the existence of pkg-config is mentioned as part of the error/warning message.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (/usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
On platforms where pkg-config is required (only Linux at the moment), configure will abort when not detecting pkg-config:
checking for pkg-config... no
configure: error: pkg-config is required
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/465
This mail reflects revision 5 of this Change. Acked-by according to Gerrit (reflected above):
Antonio Quartulli <[email protected]...>
configure.ac +17 -5
@@ -323,6 +323,7 @@ AM_CONDITIONAL([TARGET_LINUX], [true]) AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) have_sitnl="yes" + pkg_config_required="yes" ;; *-*-solaris*) AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?])
@@ -376,6 +377,16 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + if test "${pkg_config_required}" = "yes"; then + AC_MSG_ERROR([pkg-config is required]) + fi + pkg_config_found="(not found)" +else + pkg_config_found="(${PKG_CONFIG})" +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -810,7 +821,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -854,10 +865,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -878,7 +890,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1083,7 +1095,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1508,7 +1520,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
[Openvpn-devel] [PATCH applied] Re: Make it more explicit and visible when pkg-config is not found
This should be really helping clearing up user confusion, which our current messages don't do ("but I do have all the libraries, why is it still failing?"). Thanks, Antonio, for testing and ACKing.
I have not explicitly tested anything, just pushed to GHA and buildbot, to be sure it's not accidently breaking some oddball plattform.
Your patch has been applied to the master and release/2.6 branch.
commit c0f38019b4a2044c1fe873d7d33c13ce571d3386 (master) commit d602fc03e9719681fd3c9f45922fbca9470e3afa (release/2.6)
Author: Arne Schwabe Date: Fri Jan 5 15:05:40 2024 +0100
Make it more explicit and visible when pkg-config is not found
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Antonio Quartulli <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27939.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#6) to the change originally created by plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by ordex
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Make it more explicit and visible when pkg-config is not found
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
On platforms that do not require pkg-config and for optional libraries, the existence of pkg-config is mentioned as part of the error/warning message.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (/usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
On platforms where pkg-config is required (only Linux at the moment), configure will abort when not detecting pkg-config:
checking for pkg-config... no
configure: error: pkg-config is required
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27939.html
---
M configure.ac
1 file changed, 17 insertions(+), 5 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/465/6
configure.ac +17 -5
@@ -323,6 +323,7 @@ AM_CONDITIONAL([TARGET_LINUX], [true]) AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) have_sitnl="yes" + pkg_config_required="yes" ;; *-*-solaris*) AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?])
@@ -376,6 +377,16 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + if test "${pkg_config_required}" = "yes"; then + AC_MSG_ERROR([pkg-config is required]) + fi + pkg_config_found="(not found)" +else + pkg_config_found="(${PKG_CONFIG})" +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -810,7 +821,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -854,10 +865,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -878,7 +890,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1083,7 +1095,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1508,7 +1520,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 6
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/465?usp=email )
Change subject: Make it more explicit and visible when pkg-config is not found
......................................................................
Make it more explicit and visible when pkg-config is not found
Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config.
On platforms that do not require pkg-config and for optional libraries, the existence of pkg-config is mentioned as part of the error/warning message.
When found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (/usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO
not found:
configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO
On platforms where pkg-config is required (only Linux at the moment), configure will abort when not detecting pkg-config:
checking for pkg-config... no
configure: error: pkg-config is required
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27939.html
---
M configure.ac
1 file changed, 17 insertions(+), 5 deletions(-)
configure.ac +17 -5
@@ -323,6 +323,7 @@ AM_CONDITIONAL([TARGET_LINUX], [true]) AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) have_sitnl="yes" + pkg_config_required="yes" ;; *-*-solaris*) AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?])
@@ -376,6 +377,16 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + if test "${pkg_config_required}" = "yes"; then + AC_MSG_ERROR([pkg-config is required]) + fi + pkg_config_found="(not found)" +else + pkg_config_found="(${PKG_CONFIG})" +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S
@@ -810,7 +821,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}"
@@ -854,10 +865,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])])
@@ -878,7 +890,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi
@@ -1083,7 +1095,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR],
@@ -1508,7 +1520,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a
Gerrit-Change-Number: 465
Gerrit-PatchSet: 6
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged